<%= if assigns[:new_wallet] do %>
  <div>
    <h2>Wallet name</h2>
    <p>
      <mark> <%= @new_wallet.name %></mark>
    </p>

    <h2>
      Wallet address
    </h2>
    <p>
      <mark><%= @new_wallet.address %></mark>
    </p>

    <h3>wif</h3>
    <p>
      <mark><%= @new_wallet_wif %></mark>
    </p>

    <p>
    Your wallet's private key, is stored in your database with encryption. Your token is a key to decrypt it.
    We dont store your token, so we haven't access to your private key.
    If you clear your browser data, you will lose access to your wallet. Please save your private key in a safe place.
    </p>
  </div>
<% else %>
  <div>
    <.simple_form
    for={@form}
    id="generate_wallet_form"
    phx-submit="generate"
    >
    <.input field={@form[:name]} type="text" placeholder="Wallet name" phx-debounce required/>


    <.button type="submit" class="contrast">Generate</.button>
    </.simple_form>
  </div>
<% end %>

<.link navigate={Helpers.user_me_path(@socket, :show)} class="secondary outline">Back</.link>

